3.1.25 \(\int \frac {\sin ^2(x)}{(a+a \sin (x))^3} \, dx\) [25]

Optimal. Leaf size=50 \[ -\frac {\cos (x)}{5 (a+a \sin (x))^3}+\frac {8 \cos (x)}{15 a (a+a \sin (x))^2}-\frac {7 \cos (x)}{15 \left (a^3+a^3 \sin (x)\right )} \]

[Out]

-1/5*cos(x)/(a+a*sin(x))^3+8/15*cos(x)/a/(a+a*sin(x))^2-7/15*cos(x)/(a^3+a^3*sin(x))

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2837, 2829, 2727} \begin {gather*} -\frac {7 \cos (x)}{15 \left (a^3 \sin (x)+a^3\right )}+\frac {8 \cos (x)}{15 a (a \sin (x)+a)^2}-\frac {\cos (x)}{5 (a \sin (x)+a)^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[x]^2/(a + a*Sin[x])^3,x]

[Out]

-1/5*Cos[x]/(a + a*Sin[x])^3 + (8*Cos[x])/(15*a*(a + a*Sin[x])^2) - (7*Cos[x])/(15*(a^3 + a^3*Sin[x]))

Rule 2727

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2829

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*
c - a*d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/(a*f*(2*m + 1))), x] + Dist[(a*d*m + b*c*(m + 1))/(a*b*(2*m + 1)
), Int[(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 -
b^2, 0] && LtQ[m, -2^(-1)]

Rule 2837

Int[sin[(e_.) + (f_.)*(x_)]^2*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[b*Cos[e + f*x]*((
a + b*Sin[e + f*x])^m/(a*f*(2*m + 1))), x] - Dist[1/(a^2*(2*m + 1)), Int[(a + b*Sin[e + f*x])^(m + 1)*(a*m - b
*(2*m + 1)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]

Rubi steps

\begin {align*} \int \frac {\sin ^2(x)}{(a+a \sin (x))^3} \, dx &=-\frac {\cos (x)}{5 (a+a \sin (x))^3}+\frac {\int \frac {-3 a+5 a \sin (x)}{(a+a \sin (x))^2} \, dx}{5 a^2}\\ &=-\frac {\cos (x)}{5 (a+a \sin (x))^3}+\frac {8 \cos (x)}{15 a (a+a \sin (x))^2}+\frac {7 \int \frac {1}{a+a \sin (x)} \, dx}{15 a^2}\\ &=-\frac {\cos (x)}{5 (a+a \sin (x))^3}+\frac {8 \cos (x)}{15 a (a+a \sin (x))^2}-\frac {7 \cos (x)}{15 \left (a^3+a^3 \sin (x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 47, normalized size = 0.94 \begin {gather*} \frac {70-15 \cos (x)-42 \cos (2 x)+7 \cos (3 x)+105 \sin (x)-12 \sin (2 x)-7 \sin (3 x)}{60 a^3 (1+\sin (x))^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]^2/(a + a*Sin[x])^3,x]

[Out]

(70 - 15*Cos[x] - 42*Cos[2*x] + 7*Cos[3*x] + 105*Sin[x] - 12*Sin[2*x] - 7*Sin[3*x])/(60*a^3*(1 + Sin[x])^3)

________________________________________________________________________________________

Maple [A]
time = 0.13, size = 37, normalized size = 0.74

method result size
default \(\frac {-\frac {8}{3 \left (\tan \left (\frac {x}{2}\right )+1\right )^{3}}+\frac {4}{\left (\tan \left (\frac {x}{2}\right )+1\right )^{4}}-\frac {8}{5 \left (\tan \left (\frac {x}{2}\right )+1\right )^{5}}}{a^{3}}\) \(37\)
risch \(-\frac {2 \left (30 i {\mathrm e}^{3 i x}+15 \,{\mathrm e}^{4 i x}-40 \,{\mathrm e}^{2 i x}-20 i {\mathrm e}^{i x}+7\right )}{15 \left ({\mathrm e}^{i x}+i\right )^{5} a^{3}}\) \(48\)
norman \(\frac {-\frac {4}{15 a}-\frac {4 \tan \left (\frac {x}{2}\right )}{3 a}-\frac {16 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{5 a}-\frac {8 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{3 a}-\frac {8 \left (\tan ^{6}\left (\frac {x}{2}\right )\right )}{3 a}-\frac {4 \left (\tan ^{5}\left (\frac {x}{2}\right )\right )}{3 a}-\frac {28 \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{5 a}}{\left (\tan ^{2}\left (\frac {x}{2}\right )+1\right )^{2} a^{2} \left (\tan \left (\frac {x}{2}\right )+1\right )^{5}}\) \(93\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^2/(a+a*sin(x))^3,x,method=_RETURNVERBOSE)

[Out]

8/a^3*(-1/3/(tan(1/2*x)+1)^3+1/2/(tan(1/2*x)+1)^4-1/5/(tan(1/2*x)+1)^5)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 104 vs. \(2 (44) = 88\).
time = 0.30, size = 104, normalized size = 2.08 \begin {gather*} -\frac {4 \, {\left (\frac {5 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {10 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right )}}{15 \, {\left (a^{3} + \frac {5 \, a^{3} \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {10 \, a^{3} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {10 \, a^{3} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac {5 \, a^{3} \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} + \frac {a^{3} \sin \left (x\right )^{5}}{{\left (\cos \left (x\right ) + 1\right )}^{5}}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^2/(a+a*sin(x))^3,x, algorithm="maxima")

[Out]

-4/15*(5*sin(x)/(cos(x) + 1) + 10*sin(x)^2/(cos(x) + 1)^2 + 1)/(a^3 + 5*a^3*sin(x)/(cos(x) + 1) + 10*a^3*sin(x
)^2/(cos(x) + 1)^2 + 10*a^3*sin(x)^3/(cos(x) + 1)^3 + 5*a^3*sin(x)^4/(cos(x) + 1)^4 + a^3*sin(x)^5/(cos(x) + 1
)^5)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 90 vs. \(2 (44) = 88\).
time = 0.33, size = 90, normalized size = 1.80 \begin {gather*} -\frac {7 \, \cos \left (x\right )^{3} + \cos \left (x\right )^{2} - {\left (7 \, \cos \left (x\right )^{2} + 6 \, \cos \left (x\right ) - 3\right )} \sin \left (x\right ) - 9 \, \cos \left (x\right ) - 3}{15 \, {\left (a^{3} \cos \left (x\right )^{3} + 3 \, a^{3} \cos \left (x\right )^{2} - 2 \, a^{3} \cos \left (x\right ) - 4 \, a^{3} + {\left (a^{3} \cos \left (x\right )^{2} - 2 \, a^{3} \cos \left (x\right ) - 4 \, a^{3}\right )} \sin \left (x\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^2/(a+a*sin(x))^3,x, algorithm="fricas")

[Out]

-1/15*(7*cos(x)^3 + cos(x)^2 - (7*cos(x)^2 + 6*cos(x) - 3)*sin(x) - 9*cos(x) - 3)/(a^3*cos(x)^3 + 3*a^3*cos(x)
^2 - 2*a^3*cos(x) - 4*a^3 + (a^3*cos(x)^2 - 2*a^3*cos(x) - 4*a^3)*sin(x))

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 206 vs. \(2 (48) = 96\).
time = 2.76, size = 206, normalized size = 4.12 \begin {gather*} - \frac {40 \tan ^{2}{\left (\frac {x}{2} \right )}}{15 a^{3} \tan ^{5}{\left (\frac {x}{2} \right )} + 75 a^{3} \tan ^{4}{\left (\frac {x}{2} \right )} + 150 a^{3} \tan ^{3}{\left (\frac {x}{2} \right )} + 150 a^{3} \tan ^{2}{\left (\frac {x}{2} \right )} + 75 a^{3} \tan {\left (\frac {x}{2} \right )} + 15 a^{3}} - \frac {20 \tan {\left (\frac {x}{2} \right )}}{15 a^{3} \tan ^{5}{\left (\frac {x}{2} \right )} + 75 a^{3} \tan ^{4}{\left (\frac {x}{2} \right )} + 150 a^{3} \tan ^{3}{\left (\frac {x}{2} \right )} + 150 a^{3} \tan ^{2}{\left (\frac {x}{2} \right )} + 75 a^{3} \tan {\left (\frac {x}{2} \right )} + 15 a^{3}} - \frac {4}{15 a^{3} \tan ^{5}{\left (\frac {x}{2} \right )} + 75 a^{3} \tan ^{4}{\left (\frac {x}{2} \right )} + 150 a^{3} \tan ^{3}{\left (\frac {x}{2} \right )} + 150 a^{3} \tan ^{2}{\left (\frac {x}{2} \right )} + 75 a^{3} \tan {\left (\frac {x}{2} \right )} + 15 a^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)**2/(a+a*sin(x))**3,x)

[Out]

-40*tan(x/2)**2/(15*a**3*tan(x/2)**5 + 75*a**3*tan(x/2)**4 + 150*a**3*tan(x/2)**3 + 150*a**3*tan(x/2)**2 + 75*
a**3*tan(x/2) + 15*a**3) - 20*tan(x/2)/(15*a**3*tan(x/2)**5 + 75*a**3*tan(x/2)**4 + 150*a**3*tan(x/2)**3 + 150
*a**3*tan(x/2)**2 + 75*a**3*tan(x/2) + 15*a**3) - 4/(15*a**3*tan(x/2)**5 + 75*a**3*tan(x/2)**4 + 150*a**3*tan(
x/2)**3 + 150*a**3*tan(x/2)**2 + 75*a**3*tan(x/2) + 15*a**3)

________________________________________________________________________________________

Giac [A]
time = 0.48, size = 29, normalized size = 0.58 \begin {gather*} -\frac {4 \, {\left (10 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 5 \, \tan \left (\frac {1}{2} \, x\right ) + 1\right )}}{15 \, a^{3} {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^2/(a+a*sin(x))^3,x, algorithm="giac")

[Out]

-4/15*(10*tan(1/2*x)^2 + 5*tan(1/2*x) + 1)/(a^3*(tan(1/2*x) + 1)^5)

________________________________________________________________________________________

Mupad [B]
time = 6.64, size = 29, normalized size = 0.58 \begin {gather*} -\frac {4\,\left (10\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+5\,\mathrm {tan}\left (\frac {x}{2}\right )+1\right )}{15\,a^3\,{\left (\mathrm {tan}\left (\frac {x}{2}\right )+1\right )}^5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^2/(a + a*sin(x))^3,x)

[Out]

-(4*(5*tan(x/2) + 10*tan(x/2)^2 + 1))/(15*a^3*(tan(x/2) + 1)^5)

________________________________________________________________________________________